function h=drawobj(nodes,pos)
% drawobj: Draw a given simple object with some vertex nodes
%
% SYNTAX:
%   h = drawobj(nodes,pos)
%   Return handles of graphics objects drawn.
%   Argument nodes is a matrix of size Nx2, in which each row is a vertex position.

%   Author: Hongbin Ma
%   Last updated: 2009-6-2 with MATLAB 6.5
%   Problems or suggestions? Email me: mathmhb[at]163.com

x=nodes(:,1)+pos(:,1);
y=nodes(:,2)+pos(:,2);
h=plot(x,y);
